﻿// /*
//  * @Author: wanyiming
//  * @Date:2024-05-22-21:28
//  * @Description:
//  */

using System.Collections.Generic;
using Code.DataManager;
using Code.GameLogic.BaseClass;
using Code.GameLogic.XianJian.UI;
using Code.GameLogic.XianJian.Vo;
using QFramework;

namespace Code.GameLogic.XianJian.Controller
{
    public class XianJianManager : AbsGameLogicManager
    {
        private Dictionary<string, XianJianUIBo> _xianJianUIList;
        private Dictionary<string, XianJianBo> _xianJianBos;
        public override void LoadManagerData()
        {
            _xianJianUIList = this.GetModel<SettingBo>().XianJianUIList;
            PrintLogger("加载防御塔UI数据："+_xianJianUIList.Count);
            
            
            _xianJianBos = this.GetModel<SettingBo>().XianJianBos;
            PrintLogger("加载防御塔数据："+_xianJianBos.Count);
            
            this.RegisterEvent<BuilderXianJianVo>(BuildingXianJian);
            
        }

        
        
        public void BuildingXianJian(BuilderXianJianVo builderXianJianVo)
        {
            var xianJianBo = _xianJianBos[builderXianJianVo.XianJianTypeCode];
            XianJianController XianJian = BindControllerToGo<XianJianBo, XianJianController, XianJianManager>(builderXianJianVo.BlockGo.transform, xianJianBo, this);
        }
        
        
    }
}